package com.ruoyi.basicData.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basicData.mapper.RareaManagementMapper;
import com.ruoyi.basicData.domain.RareaManagement;
import com.ruoyi.basicData.service.IRareaManagementService;

/**
 * 库位管理Service业务层处理
 * 
 * @author admin
 * @date 2024-06-26
 */
@Service
public class RareaManagementServiceImpl implements IRareaManagementService 
{
    @Autowired
    private RareaManagementMapper rareaManagementMapper;

    /**
     * 查询库位管理
     * 
     * @param rareaManagementId 库位管理主键
     * @return 库位管理
     */
    @Override
    public RareaManagement selectRareaManagementByRareaManagementId(Long rareaManagementId)
    {
        return rareaManagementMapper.selectRareaManagementByRareaManagementId(rareaManagementId);
    }

    /**
     * 查询库位管理列表
     * 
     * @param rareaManagement 库位管理
     * @return 库位管理
     */
    @Override
    public List<RareaManagement> selectRareaManagementList(RareaManagement rareaManagement)
    {
        return rareaManagementMapper.selectRareaManagementList(rareaManagement);
    }

    /**
     * 新增库位管理
     * 
     * @param rareaManagement 库位管理
     * @return 结果
     */
    @Override
    public int insertRareaManagement(RareaManagement rareaManagement)
    {
        rareaManagement.setCreateTime(DateUtils.getNowDate());
        return rareaManagementMapper.insertRareaManagement(rareaManagement);
    }

    /**
     * 修改库位管理
     * 
     * @param rareaManagement 库位管理
     * @return 结果
     */
    @Override
    public int updateRareaManagement(RareaManagement rareaManagement)
    {
        return rareaManagementMapper.updateRareaManagement(rareaManagement);
    }

    /**
     * 批量删除库位管理
     * 
     * @param rareaManagementIds 需要删除的库位管理主键
     * @return 结果
     */
    @Override
    public int deleteRareaManagementByRareaManagementIds(Long[] rareaManagementIds)
    {
        return rareaManagementMapper.deleteRareaManagementByRareaManagementIds(rareaManagementIds);
    }

    /**
     * 删除库位管理信息
     * 
     * @param rareaManagementId 库位管理主键
     * @return 结果
     */
    @Override
    public int deleteRareaManagementByRareaManagementId(Long rareaManagementId)
    {
        return rareaManagementMapper.deleteRareaManagementByRareaManagementId(rareaManagementId);
    }
}
